<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAuthRule extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('auth_rules', function (Blueprint $table) {
            $table->increments('id');
            $table->string("name",255)->nullable();
            $table->string("title",255)->nullable();
            $table->string("type",255)->nullable();
            $table->string("condition",255)->nullable();
            $table->string("parent_id",255)->nullable();
            $table->string("level",255)->nullable();
            $table->integer("sort")->nullable();
            $table->integer('status')->default(1)->nullable()->comment("1[启用]2[禁用]");
            $table->timestamps();
        });
        DB::statement("ALTER TABLE `auth_rules` comment'规则表'"); // 表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
